package com.newlink.building.record.adapter

import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentActivity
import androidx.viewpager2.adapter.FragmentStateAdapter

/**
 * @author wangyang
 * @date 2022/9/23
 * @description 记录ViewPager的Adapter
 */
class Module_Record_RecordViewPagerAdapter(activity: FragmentActivity, fragments: List<Fragment>) :
    FragmentStateAdapter(activity) {

    val mFragments: List<Fragment> = fragments;

    override fun getItemCount(): Int {
        return mFragments.size
    }

    override fun createFragment(position: Int): Fragment {
        return mFragments.get(position)
    }
}